﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ElectronicsMarket_Desktop.EMServices;
using System.Windows.Forms;

namespace ElectronicsMarket_Desktop.BL
{
   public class ReceiptBL
    {
       ServicesReleaseSoapClient services;
       RECEIPT receipt;

       public RECEIPT Receipt
       {
           get { return receipt; }
           set { receipt = value; }
       }
       public ReceiptBL()
       {
           receipt = new RECEIPT();
           services = new ServicesReleaseSoapClient();
       }
       public void InsertReceipt()
       {
           try
           {
               services.InsertReceipt(Receipt);
               MessageBox.Show("Đã lập phiếu");
           }
           catch (NotImplementedException noimpl)
           {
               MessageBox.Show(noimpl.Message);
               
           }
       }
       public void UpdateReceipt()
       {
           services.updateReceipt(Receipt);
       }
       public  long getLastPreceiptId()
       {
           return services.getLastPreceiptId();
       }
    }
}
